﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class KHJB_KHJBList : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
    if (!ProjectPrivate.GetQX("2"))
    {
      Server.Transfer("~\\blank.aspx");
    }
    BindGrid();
  }

  protected void BindGrid()
  {
    DataSet ds = KHJB.GetDS();
    ASPxGridView1.DataSource = ds;
    ASPxGridView1.DataBind();
  }

  protected void lbDelete_Command(object sender, CommandEventArgs e)
  {
    List<CommandInfo> cis = new List<CommandInfo>();

    cis.Add(CommonUse.DeleteCI("jcxx_khjb", "khjbid", e.CommandArgument.ToString()));

    if (DbHelperSQL.ExecuteSqlTran(cis) > 0)
    {
      BindGrid();
    }
  }
}
